package com.exd.flink.sink.hbase;

import org.apache.flink.streaming.api.datastream.DataStream;

import com.exd.flink.domain.VComputeBean;
import com.exd.flink.domain.VDataBean;
import com.exd.flink.domain.VDataErrorBean;
import com.exd.flink.sink.business.VcomputePackageSink;
import com.exd.flink.sink.business.VdataErrorSink;
import com.exd.flink.sink.business.VdataPackageSink;
import com.exd.flink.sink.business.VdataShardSink;

public class HbaseSink {
	
	/**
	 * VDATA 异常数据
	 */
	public static void vdataError(DataStream<VDataErrorBean> errorDataStream,String tableName) {
		errorDataStream.addSink(new VdataErrorSink(tableName));	
	}
	
	/**
	 * VDATA 分片数据
	 */
	public static void vdataShard(DataStream<VDataBean> shardData,String tableName) {
		shardData.addSink(new VdataShardSink(tableName));
	}
	
	/**
	 * VDATA 整包数据
	 */
	public static void vdataPackage(DataStream<VDataBean> packageData,String tableName) {
		packageData.addSink(new VdataPackageSink(tableName));
	}
	
	/**
	 * VCOMPUTE 数据
	 */
	public static void vcomputeData(DataStream<VComputeBean> vcomputeData,String tableName) {
		vcomputeData.addSink(new VcomputePackageSink(tableName));
	}

}
